FComparablePtr< I > Class Template Reference
[FUnknown/FObject Containers]

Extends IPtr to allow comparison in containers. More...

#include <fcontainer.h>

Public Member Functions

 FComparablePtr (I *_ptr, bool addRef=true)
 FComparablePtr (const FComparablePtr &p)
 FComparablePtr ()
template<class T2 >
 FComparablePtr (const T2 &t2)
bool operator== (const FComparablePtr< I > &other) const
bool operator!= (const FComparablePtr< I > &other) const

Detailed Description

template<class I>
class Steinberg::FComparablePtr< I >

Extends IPtr to allow comparison in containers.

When an implementation of FObject defines operators== and a lookup in a container should compare object data instead of addresses, FComparablePtr can be used instead of IPtr.

Example:

TArray <FComparablePtr <StringObject> > strings;
StringObject* test = new StringObject ("test");
strings.add (test);
test->release ();

StringObject tmp ("test");
StringObject* lookup = strings.lookup (&tmp);

Constructor & Destructor Documentation

FComparablePtr ( I *  _ptr,
bool  addRef = true 
) [inline]
FComparablePtr ( const FComparablePtr< I > &  p  )  [inline]
FComparablePtr (  )  [inline]
FComparablePtr ( const T2 &  t2  )  [inline]

Member Function Documentation

bool operator== ( const FComparablePtr< I > &  other  )  const [inline]
bool operator!= ( const FComparablePtr< I > &  other  )  const [inline]
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Empty

Copyright ©2013 Steinberg Media Technologies GmbH. All Rights Reserved.